Original Data and Code Access

Results in this file are upon expanding the universe to include NYSE, NASDAQ and AMEX (per the AE comments). And here you can access the results with only the NYSE universe.

Size-Invest portfolios are formed based on the NYSE, NASDAQ and AMEX.

Further improvement: + Change the risk-free rate data to the ones compatible with different frequency requirements.

Data cleaning and Preparation

Information about initial coding setup:

  1. freq sets the data frequency for the following analysis, 12 for monthly data, 4 for quarterly data and 1 for annual data.
  2. start.ym gives the earliest reasonable starting point of the series, which is January 1966, based on the available number of firms in the data set.
  3. After the preliminary data cleaning, port_market is the market portfolio data (including NYSE, NASDAQ and AMEX), ports_all contains the data for each of the six portfolios. All the data are stored in the file named as market.names and data.names. Six portfolios are BH, BM, BL, SH, SM and SL.
  4. RF denotes the risk-free rate, which is the average of the bid and ask.
# 0. record datasets ----
## 0.1 initial value setup ----
freq = 12 # the frequency of the data <- 12 for monthly; 4 for quarterly; 1 for annually
start.ym = as.yearmon(1966) # the starting time

month_select <- function(freq = freq) { # return the months for differnt time frequency
  if (freq == 12) {
    return(c("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November","December"))
  }
  if (freq == 4) {
    return(c("March", "June", "September", "December"))
  }
  if (freq == 1) {
    return("December")
  }
}
freq_name <- function(freq = freq) {
  if (freq == 12) {
    return("monthly")
  }
  if (freq == 4) {
    return("quarterly")
  }
  if (freq == 1) {
    return("annual")
  }
}

## 0.2 preliminary data cleaning ----
port_market <- read.csv("Allfirms_comp2.csv") %>%
  as.tbl() %>%
  # mutate(E = rollmeanr(E, k = 12, fill = NA_real_)) %>%
  mutate(month = as.yearmon(as.Date(date)),
         vwret = rollsumr(vwret, k = 12/freq, fill = NA)) %>%
  filter(months(month) %in% month_select(freq = freq))
write.csv(x = port_market, file = "market_Allfirms.csv")

ports_all <- read.csv("Allfirms_sizebm.csv") %>%
  as.tbl() %>%
  mutate(month = as.yearmon(as.Date(jdate)),
         port = as.character(port))
ports <- unique(ports_all$port) # identifiers for portfolios
for (p in ports) {
  ports.dt <- ports_all %>%
    filter(port == p) %>%
    arrange(month) %>%
    # mutate(vwret = rollsumr(vwret, k = 12/freq, fill = NA)) %>%
    filter(months(month) %in% month_select(freq = freq)) # %>%
    # mutate(E = rollmeanr(E, k = 12, fill = NA_real_))
  ports.dt <- ports.dt[, -1]
  write.csv(x = ports.dt, file = paste("port_", p, ".csv", sep = ""))
}

## 0.3 name portfolios and predictors ----
market.names <- list.files(pattern = "market_")
data.names <- list.files(pattern = "port_") # data for portfolios
id.names <- c("Market", ports) # set plot names
ratio_names <- c("DP", "PE", "EY", "DY", "Payout") # potential predictors

## 0.4 risk-free rate
RF <- read.csv("Rfree_t30.csv") %>% # record the risk free rate
  as.tbl() %>% # as the average of the bid and ask.
  select(-X) %>%
  mutate(month = as.yearmon(month)) %>%
  filter(months(month) %in% month_select(freq = freq)) %>%
  filter(month >= start.ym)

Notes: Seems that the big-value and small-growth portfolios include less firms comparing the other four characteristic portfolios, around half of them.

Figure 1 - Log Cumulative Index

Log cumulative realised portfolio return components for seven portfolios - the market portfolio and six size and book-to-market equity ratio sorted portfolios. All following figures decmonstrate the monthly realised price-earnings ratio growth (gm), earnings growth (ge), dividend-price (dp) and the portfolio return index (r) with the values in January 1966 as zero for all portfolios.

# TABLE-1. summary statistics ----
TABLE1.uni <- list() # the univariate statistics
TABLE1.cor <- list() # the correlation matrixs

PE.df <- data.frame(month = port_market$month[port_market$month >= start.ym])
EY.df <- data.frame(month = port_market$month[port_market$month >= start.ym])
DP.df <- data.frame(month = port_market$month[port_market$month >= start.ym])

## (1*) summary tables for Summary & Correlations ----
c <- 0
for (id in c(market.names, data.names)) {
  c <- c + 1
  # print(id); print(id.names[c])
  
  ## 1. read the data ----
  data_nyse <- read.csv(id) %>%
    as.tbl() %>%
    mutate(month = as.yearmon(month)) %>%
    filter(month >= start.ym) %>% # start from "Jan 1966"
    select(month, r = vwret, P, E, D) %>%
    mutate(DP = D / P, # these are adjusted by the log transformation
           PE = P / E,
           EP = E / P,
           EY = E / lag(P), # earnings yield
           DY = D / lag(P), # dividend yield
           Payout = D / E) # payout ratios
  
  PE.df <- cbind.data.frame(PE.df, data_nyse$PE)
  EY.df <- cbind.data.frame(EY.df, data_nyse$EY)
  DP.df <- cbind.data.frame(DP.df, data_nyse$DP)
  
  ## 2. return decomposition ----
  data_decompose <- data_nyse %>%
    mutate(r = r, # cts returns = log total returns
           gm = log(PE) - lag(log(PE)), # multiple expansion rate
           ge = log(E) - lag(log(E)), # earnings growth rate
           dp = log(1 + DP/freq)) %>% # only 1/12 of the dividends
    na.omit()
  
  ## 3. summary-Stat ----
  ar1.coef <- function(x) {
    return(as.numeric(lm(x ~ lag(x))$coefficients[2]))
  } # return the function value of the coefficient for the AR(1) model
  
  comp_summary.dt <- data_decompose %>%
    select(gm, ge, dp, r) %>%
    describe() %>%
    mutate(mean = mean * 100,
           sd = sd * 100,
           median = median * 100,
           min = min * 100,
           max = max * 100) %>%
    select(Mean = mean, Median = median, SD = sd, Min = min, Max = max, Skew = skew, Kurt = kurtosis) %>%
    round(digits = 4)
  
  comp_summary.dt$"AR(1)" <- data_decompose %>%
    select(gm, ge, dp, r) %>%
    apply(2, ar1.coef) %>%
    round(digits = 4)
  
  ### Store the summary stat
  # print(paste("Data starts from ", first(data_decompose$month), " and ends in ", last(data_decompose$month), ".", sep = ""))
  TABLE1.uni[[id.names[c]]] <- comp_summary.dt
  
  ## 4. correlations ----
  comp_cor <- data_decompose %>% select(gm, ge, dp, r) %>% cor()
  TABLE1.cor[[id.names[c]]] <- comp_cor
  
  # Figure-1. cumulative realised return components ---- 
  # jpeg(filename = paste("Figure1_", id.names[c], ".jpeg", sep = ""), width = 550, height = 350)
  par(mar = c(2, 4, 2, 1))
  cum_components.ts <- data_decompose %>%
    select(r, gm, ge, dp) %>%
    apply(2, cumsum) %>%
    ts(start = data_decompose$month[1], frequency = freq)
  plot.ts(cum_components.ts, plot.type = "single", lty = 1:4, main = id.names[c], cex.main = 1, 
          xlab = NULL, ylab = "Cumulative Return and Components Indices")
  legend("topleft",
         legend = c("Total return", "Price earnings growth",
                    "Earnings growth", "Dividend price"),
         lty = 1:4,
         cex = 1.0) # text size
  # dev.off()
  par(mar = c(5, 4, 4, 2) + 0.1)
}

write.csv(TABLE1.uni, file = "table_1.uni.csv")
write.csv(TABLE1.cor, file = "table_1.cor.csv")

.

Table 1 - Summary statistics of returns components

The correlations between gm and ge might be a bit too high comparing to Ferreira and Santa-Clara (2011). Need to check the code again.

Need to go back to the construction process of Prof Robert Shiller’s CAPE.

‘kable’ for Table Creation

Table 1 - Summary statistics of returns components
monthly data starts from Feb 1966 and ends in Dec 2019.
Panel A: univariate statistics Panel B: Correlations
Mean Median SD Min Max Skew Kurt AR(1) gm ge dp r
Market
gm 0.02 -0.03 3.12 -15.26 13.28 -0.19 4.42 0.92 1.00 -0.51 -0.03 0.07
ge 0.76 1.11 5.34 -22.01 19.34 -0.50 2.44 0.33 -0.51 1.00 -0.03 0.81
dp 0.28 0.27 0.09 0.09 0.50 0.14 -0.70 0.98 -0.03 -0.03 1.00 -0.03
r 0.94 1.25 4.43 -22.48 16.58 -0.51 1.85 0.05 0.07 0.81 -0.03 1.00
BH
gm 0.08 2.57 87.07 -390.65 299.23 -1.13 3.47 -0.42 1.00 -1.00 0.01 0.07
ge 0.62 0.00 86.98 -307.31 392.56 1.12 3.50 -0.42 -1.00 1.00 -0.01 -0.02
dp 0.39 0.36 0.18 0.12 0.87 0.55 -0.58 0.98 0.01 -0.01 1.00 0.02
r 1.00 1.30 4.62 -21.28 21.48 -0.32 2.10 0.05 0.07 -0.02 0.02 1.00
BL
gm -0.03 0.90 38.45 -204.59 137.76 -1.28 6.42 -0.45 1.00 -0.99 -0.03 0.12
ge 0.74 0.04 38.22 -133.43 208.37 1.36 6.73 -0.46 -0.99 1.00 0.02 0.00
dp 0.19 0.17 0.06 0.06 0.39 0.66 -0.08 0.96 -0.03 0.02 1.00 -0.05
r 0.88 1.11 4.64 -23.25 21.68 -0.32 1.77 0.05 0.12 0.00 -0.05 1.00
BM
gm -0.08 3.19 65.96 -367.68 280.12 -1.12 4.49 -0.40 1.00 -1.00 -0.01 0.13
ge 0.75 -0.16 65.59 -274.51 366.53 1.15 4.52 -0.40 -1.00 1.00 0.00 -0.07
dp 0.32 0.29 0.12 0.13 0.80 0.90 0.45 0.99 -0.01 0.00 1.00 -0.05
r 0.91 1.16 4.30 -19.79 17.74 -0.36 2.04 0.03 0.13 -0.07 -0.05 1.00
SH
gm 0.53 -0.20 90.64 -444.00 428.05 -0.28 4.24 -0.34 1.00 -1.00 -0.02 0.06
ge 0.70 2.62 90.54 -430.82 440.05 0.27 4.25 -0.35 -1.00 1.00 0.02 0.00
dp 0.46 0.43 0.21 0.18 1.83 3.26 15.62 0.99 -0.02 0.02 1.00 -0.10
r 1.32 1.61 5.52 -27.82 29.37 -0.41 3.12 0.15 0.06 0.00 -0.10 1.00
SL
gm 0.26 0.71 65.46 -396.31 328.73 -0.49 9.06 -0.34 1.00 -0.99 0.02 0.01
ge 0.77 0.00 65.72 -328.74 401.50 0.53 9.40 -0.35 -0.99 1.00 -0.03 0.09
dp 0.18 0.15 0.12 0.02 0.92 2.47 8.31 0.97 0.02 -0.03 1.00 -0.04
r 0.87 1.16 6.76 -32.51 29.15 -0.35 1.86 0.13 0.01 0.09 -0.04 1.00
SM
gm 0.05 1.11 66.74 -424.91 336.18 -0.54 9.73 -0.38 1.00 -1.00 0.00 0.12
ge 1.09 0.19 66.37 -331.86 425.76 0.61 9.93 -0.39 -1.00 1.00 -0.01 -0.04
dp 0.29 0.28 0.11 0.10 0.68 0.26 -0.46 0.97 0.00 -0.01 1.00 -0.08
r 1.20 1.41 5.41 -27.36 26.31 -0.47 2.50 0.13 0.12 -0.04 -0.08 1.00
Note: Panel A in this table presents mean, median, standard deviation (SD), minimum, maximum, skewness (Skew), kurtosis (kurt) and first-order autocorrelation coefficient of the realised components of stock market returns and six size and book-to-market equity ratio sorted portfolios. These univariate statistics for each portfolios are presented separately. gm is the continuously compounded growth rate in the price-earnings ratio. ge is the continuously compounded growth rate in earnings. dp is the log of one plus the dividend-price ratio. *r* is the portfolio returns. Panel B in this table reports correlation matrices for all seven portfolios. The sample period starts from Feburary 1966 and ends in December 2019.

Figure 3 - Cumulative OOS R-sqaure Difference and Cumulative SSE Difference

The cumulative OOS R-square figures show the out-of-sample cumulative R-square up to each month from predictive regressions with listed predictors and from the sum-of-the-parts (SOP) method for each portfolio. The cumulative SSE difference plots indicates the out-of-sample performance of each model. These are evaluated by the cumulative squared prediction errors of the NULL minus the cumulative squared predictirion error of the ALTERNATIVE. The NULL model is the historical mean model, while the ALTERNATIVE model is either the predictive regression model or the SOP model. An incresae in the line suggests better performance of the ALTERNATIVE model and a decrease suggests that the NULL model is better.

Several points to note in the coding:

  1. The dividend-price ratio (‘DP’ hereafter) is calculated as the log of 1 plus the frequency-adjusted dividend to price ratio, rather than using the annual dividend. As by this return decomposition, the expected amount of dividend payout in each period should be adjusted by the frequency of the data in the analysis. \[ dp_t = \log (1 + \frac{\tilde{D}_t}{P_t}) = \log (1 + \frac{D_t / n}{P_t}) \text{,} \] where \(D_t\) is the annual dividend payment and \(n\) is the data frequency (e.g. \(n = 1\) for annual data and \(n = 12\) for monthly data) and \(\tilde{D}_t\) is the freqency-adjusted dividend payment for period \(t\).

  2. The SOP method by Ferreira and Santa-Clara (2011) decomposes the portfolio return into three components, namely the earnings growth, the prie multiple expansion and the next period dividend-price ratio. Here to generate the SOP prediction, we use the rolling mean of past earnings growth as the expected growth of the next period (denoted as ge1). However, there are other choices, such as recursive means in ge2 and ge3.

  3. critica.value = TRUE is the option whether to use boostrap method to calculate the MSE-F critical values. This is used in function Boot_MSE.F.

  4. The authors should evaluate the significance of the MSE−F statistic by using the theoret- ical distribution derived in McCracken (2007). The bootstrap-based inference (presented in Pages 9-10) can represent a robustness check and moved to an appendix. Further- more, the authors can also include in the main results the related out-of-sample statistic proposed by Clark and West (2007), which follows a standard Normal distribution. Therefore, readjust the Boot_MSE.F function.

  5. Column McCracken in Table 2 (line 604) gives the significance of the out-of-sample \(MSE–F\) statistic of McCracken (2007). \(***\), \(**\), and \(*\) denote significance at the 1%, 5%, and 10% level, respectively. Please refer to the Table 4 on P749 in McCracken (2007) with \(k_2 = 1\) and \(\pi = P/R = \frac{\text{Number of out-of-sample forecasts}}{\text{Number of observations used to form the first forecast}} = 1.6\).

## [1] "market_Allfirms.csv"
## [1] "Market"
## ##------ Wed May  4 11:56:41 2022 ------##
## Note: Using an external vector in selections is ambiguous.
## ℹ Use `all_of(actual)` instead of `actual` to silence this message.
## ℹ See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
## This message is displayed once per session.
## Note: Using an external vector in selections is ambiguous.
## ℹ Use `all_of(cond)` instead of `cond` to silence this message.
## ℹ See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
## This message is displayed once per session.
## Note: Using an external vector in selections is ambiguous.
## ℹ Use `all_of(uncond)` instead of `uncond` to silence this message.
## ℹ See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
## This message is displayed once per session.
## Note: Using an external vector in selections is ambiguous.
## ℹ Use `all_of(x)` instead of `x` to silence this message.
## ℹ See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
## This message is displayed once per session.
## [1] "OOS R Squared: 0.0047"
## [1] "MSE-F: 1.8524"
## Note: Using an external vector in selections is ambiguous.
## ℹ Use `all_of(predictor)` instead of `predictor` to silence this message.
## ℹ See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
## This message is displayed once per session.

## [1] "IS R Squared: 0.0106"
## [1] "OOS R Squared: -0.0104"
## [1] "MSE-F: -4.054"
## [1] "IS R Squared: 0.0045"
## [1] "OOS R Squared: -0.0023"
## [1] "MSE-F: -0.9222"
## [1] "IS R Squared: 0.0051"
## [1] "OOS R Squared: -0.0017"
## [1] "MSE-F: -0.658"
## [1] "IS R Squared: 0.012"
## [1] "OOS R Squared: -0.0086"
## [1] "MSE-F: -3.3515"
## [1] "IS R Squared: 1e-04"
## [1] "OOS R Squared: -0.0079"
## [1] "MSE-F: -3.1035"

## [1] "port_BH.csv"
## [1] "BH"
## ##------ Wed May  4 11:56:45 2022 ------##
## [1] "OOS R Squared: 0.0101"
## [1] "MSE-F: 4.1621"

## [1] "IS R Squared: 0.0121"
## [1] "OOS R Squared: -0.0018"
## [1] "MSE-F: -0.7471"
## [1] "IS R Squared: 0.0023"
## [1] "OOS R Squared: -0.0022"
## [1] "MSE-F: -0.9008"
## [1] "IS R Squared: 0.0025"
## [1] "OOS R Squared: -0.002"
## [1] "MSE-F: -0.7906"
## [1] "IS R Squared: 0.0135"
## [1] "OOS R Squared: 5e-04"
## [1] "MSE-F: 0.1928"
## [1] "IS R Squared: 0"
## [1] "OOS R Squared: -0.0112"
## [1] "MSE-F: -4.4813"

## [1] "port_BL.csv"
## [1] "BL"
## ##------ Wed May  4 11:56:50 2022 ------##
## [1] "OOS R Squared: 0.0072"
## [1] "MSE-F: 2.9381"

## [1] "IS R Squared: 0.0067"
## [1] "OOS R Squared: -0.0025"
## [1] "MSE-F: -1.0096"
## [1] "IS R Squared: 0.0076"
## [1] "OOS R Squared: 0.0023"
## [1] "MSE-F: 0.9396"
## [1] "IS R Squared: 0.0082"
## [1] "OOS R Squared: 0.0028"
## [1] "MSE-F: 1.1252"
## [1] "IS R Squared: 0.0076"
## [1] "OOS R Squared: -0.0022"
## [1] "MSE-F: -0.8713"
## [1] "IS R Squared: 0.0016"
## [1] "OOS R Squared: -0.001"
## [1] "MSE-F: -0.4077"

## [1] "port_BM.csv"
## [1] "BM"
## ##------ Wed May  4 11:56:53 2022 ------##
## [1] "OOS R Squared: 0.0049"
## [1] "MSE-F: 1.9881"

## [1] "IS R Squared: 0.0027"
## [1] "OOS R Squared: -0.0195"
## [1] "MSE-F: -7.7753"
## [1] "IS R Squared: 0.0122"
## [1] "OOS R Squared: -0.0074"
## [1] "MSE-F: -2.9856"
## [1] "IS R Squared: 0.0125"
## [1] "OOS R Squared: -0.0062"
## [1] "MSE-F: -2.4872"
## [1] "IS R Squared: 0.003"
## [1] "OOS R Squared: -0.0183"
## [1] "MSE-F: -7.277"
## [1] "IS R Squared: 0.0101"
## [1] "OOS R Squared: -0.0036"
## [1] "MSE-F: -1.4685"

## [1] "port_SH.csv"
## [1] "SH"
## ##------ Wed May  4 11:56:55 2022 ------##
## [1] "OOS R Squared: -0.0335"
## [1] "MSE-F: -13.1853"

## [1] "IS R Squared: 0.0026"
## [1] "OOS R Squared: -0.0198"
## [1] "MSE-F: -7.8987"
## [1] "IS R Squared: 0.0084"
## [1] "OOS R Squared: -0.0101"
## [1] "MSE-F: -4.0736"
## [1] "IS R Squared: 0.0093"
## [1] "OOS R Squared: -0.01"
## [1] "MSE-F: -4.0317"
## [1] "IS R Squared: 0.0053"
## [1] "OOS R Squared: -0.0241"
## [1] "MSE-F: -9.5376"
## [1] "IS R Squared: 0.0067"
## [1] "OOS R Squared: -0.0067"
## [1] "MSE-F: -2.7159"

## [1] "port_SL.csv"
## [1] "SL"
## ##------ Wed May  4 11:56:58 2022 ------##
## [1] "OOS R Squared: -0.0041"
## [1] "MSE-F: -1.6725"

## [1] "IS R Squared: 0.0071"
## [1] "OOS R Squared: -0.0153"
## [1] "MSE-F: -6.1249"
## [1] "IS R Squared: 4e-04"
## [1] "OOS R Squared: -0.0188"
## [1] "MSE-F: -7.5078"
## [1] "IS R Squared: 2e-04"
## [1] "OOS R Squared: -0.0158"
## [1] "MSE-F: -6.324"
## [1] "IS R Squared: 0.0097"
## [1] "OOS R Squared: -0.0194"
## [1] "MSE-F: -7.7317"
## [1] "IS R Squared: 0.0025"
## [1] "OOS R Squared: -0.0438"
## [1] "MSE-F: -17.0442"

## [1] "port_SM.csv"
## [1] "SM"
## ##------ Wed May  4 11:57:01 2022 ------##
## [1] "OOS R Squared: -0.0025"
## [1] "MSE-F: -0.9981"

## [1] "IS R Squared: 0.0054"
## [1] "OOS R Squared: -0.0128"
## [1] "MSE-F: -5.1381"
## [1] "IS R Squared: 0.001"
## [1] "OOS R Squared: -0.008"
## [1] "MSE-F: -3.2205"
## [1] "IS R Squared: 0.0014"
## [1] "OOS R Squared: -0.0092"
## [1] "MSE-F: -3.6963"
## [1] "IS R Squared: 0.008"
## [1] "OOS R Squared: -0.0187"
## [1] "MSE-F: -7.4505"
## [1] "IS R Squared: 0"
## [1] "OOS R Squared: -0.0055"
## [1] "MSE-F: -2.2068"

Table 2 - Forecasts of portfolio returns

This table demonstrates the in-sample and out-of-sample R-squares for the market and six size and book-to-market equity ratio sorted portfolios from predictive regressions and the Sum-of-the-Parts method. IS R-squares are estimated using the whole sample period and the OOS R-squares are calculated compare the forecast error of the model against the historical mean model. The full sample period starts from Feb 1966 to December 2019 and the IS period is set to be 20 years with forecsats beginning in Feb 1986. The MSE-F statistics are calculated to test the hypothesis \(H_0: \text{out-of-sample R-squares} = 0\) vs \(H_1: \text{out-of-sample R-squares} \neq 0\).

Predictors here are all in log terms.

gt(table2.df, rowname_col = "rowname", groupname_col = "portname") %>%
  tab_header(title = "Table 2 - Forecasts of portfolio returns",
             subtitle = paste(freq_name(freq = freq), " data starts from ", first(data_decompose$month), " and ends in ", last(data_decompose$month), ".", sep = "")) %>%
  fmt_number(columns = 1:4, decimals = 6, suffixing = TRUE)
Table 2 - Forecasts of portfolio returns
monthly data starts from Feb 1966 and ends in Dec 2019.
IS_r.squared OOS_r.squared MAE_A MSE_F McCracken
Market
DP 0.010630 −0.010370 0.032611 −4.054026
PE 0.004546 −0.002340 0.032475 −0.922206
EY 0.005117 −0.001669 0.032494 −0.657989
DY 0.011952 −0.008557 0.032621 −3.351461
Payout 0.000117 −0.007919 0.032081 −3.103538
SOP NA 0.004656 0.032173 1.852440 **
BH
DP 0.012141 −0.001843 0.035513 −0.747081
PE 0.002280 −0.002224 0.034892 −0.900783
EY 0.002539 −0.001951 0.034893 −0.790612
DY 0.013454 0.000475 0.035511 0.192775
Payout 0.000000 −0.011161 0.034902 −4.481333
SOP NA 0.010123 0.035089 4.162058 ***
BL
DP 0.006731 −0.002493 0.034140 −1.009610
PE 0.007621 0.002309 0.033983 0.939596 *
EY 0.008212 0.002764 0.033964 1.125249 *
DY 0.007610 −0.002151 0.034123 −0.871331
Payout 0.001631 −0.001005 0.033960 −0.407738
SOP NA 0.007167 0.034024 2.938063 **
BM
DP 0.002714 −0.019525 0.032460 −7.775298
PE 0.012241 −0.007408 0.031843 −2.985556
EY 0.012510 −0.006164 0.031841 −2.487230
DY 0.002998 −0.018251 0.032451 −7.276985
Payout 0.010099 −0.003630 0.031423 −1.468513
SOP NA 0.004861 0.031396 1.988054 **
SH
DP 0.002584 −0.019841 0.039482 −7.898728
PE 0.008435 −0.010135 0.039891 −4.073648
EY 0.009282 −0.010030 0.039920 −4.031651
DY 0.005319 −0.024057 0.039637 −9.537588
Payout 0.006673 −0.006734 0.039741 −2.715900
SOP NA −0.033481 0.039578 −13.185322
SL
DP 0.007148 −0.015317 0.049277 −6.124924
PE 0.000400 −0.018840 0.049285 −7.507779
EY 0.000182 −0.015823 0.049265 −6.324021
DY 0.009667 −0.019413 0.049333 −7.731718
Payout 0.002491 −0.043820 0.049774 −17.044185
SOP NA −0.004126 0.049329 −1.672459
SM
DP 0.005445 −0.012818 0.038898 −5.138118
PE 0.000972 −0.007996 0.038794 −3.220541
EY 0.001448 −0.009188 0.038844 −3.696328
DY 0.008016 −0.018694 0.039068 −7.450516
Payout 0.000002 −0.005465 0.038695 −2.206807
SOP NA −0.002458 0.038643 −0.998082

Figure 4 - Monthly return predictions

Here I only present the monthly predictions of the historical mean model, the SOP method and the predictive regressions based on the dividend-price ratio and the earnings-price ratio.

## [1] "market_Allfirms.csv"
## [1] "Market"
## ##------ Wed May  4 11:57:06 2022 ------##

## [1] "port_BH.csv"
## [1] "BH"
## ##------ Wed May  4 11:57:09 2022 ------##

## [1] "port_BL.csv"
## [1] "BL"
## ##------ Wed May  4 11:57:12 2022 ------##

## [1] "port_BM.csv"
## [1] "BM"
## ##------ Wed May  4 11:57:15 2022 ------##

## [1] "port_SH.csv"
## [1] "SH"
## ##------ Wed May  4 11:57:18 2022 ------##

## [1] "port_SL.csv"
## [1] "SL"
## ##------ Wed May  4 11:57:21 2022 ------##

## [1] "port_SM.csv"
## [1] "SM"
## ##------ Wed May  4 11:57:23 2022 ------##

Figure 5 - Trading Performance (with no trading restrictions)

## Warning in window.default(x, ...): 'start' value not changed

## Warning in window.default(x, ...): 'start' value not changed

## Warning in window.default(x, ...): 'start' value not changed

## Warning in window.default(x, ...): 'start' value not changed

## Warning in window.default(x, ...): 'start' value not changed

## Warning in window.default(x, ...): 'start' value not changed

## Warning in window.default(x, ...): 'start' value not changed

## Warning in window.default(x, ...): 'start' value not changed

## Warning in window.default(x, ...): 'start' value not changed

## Warning in window.default(x, ...): 'start' value not changed

## Warning in window.default(x, ...): 'start' value not changed

## Warning in window.default(x, ...): 'start' value not changed

## Warning in xy.coords(x = matrix(rep.int(tx, k), ncol = k), y = x, log =
## log, : 402 y values <= 0 omitted from logarithmic plot

## Warning in window.default(x, ...): 'start' value not changed

## Warning in window.default(x, ...): 'start' value not changed

Table 3 - Certaint equivalent gains

Trading Strategies: certaint equivalent gains

This table shows the out-of-sample portfolio choice results at monthly frequencies from predictive regressions and the SOP method. The trading strategy for each portfolio is designed by optimally allocating funds between the risk-free asset and the corresponding risky portfolio. The certainty equivalent return is \(\overline{rp} - \frac{1}{2} \gamma \hat{\sigma}_{rp}^{2}\) with a risk-aversion coefficient \(\gamma = 3\). The annualised certainty equivalent gain (in percentage) is the monthly certainty equivalent gain multiplied by the corresponding frequency (e.g. 12 for monthly data).

dt <- table3.df %>%
  filter(rowname %in% c(ratio_names, "sop_simple")) %>%
  select(CEGs_annualised, rowname, portname)

as.data.frame(matrix(dt$CEGs_annualised, byrow = F, nrow = 6, ncol = 7)) %>%
  `colnames<-`(unique(dt$portname)) %>%
  mutate(Variable = unique(dt$rowname)) %>%
  # round(digits = 4) %>%
  as.tbl() %>%
  select(Variable, unique(dt$portname)) %>%
  gt(rowname_col = "Variable") %>%
  tab_header(title = "Table 3 - Trading Strategies: certainty equivalent gains",
             subtitle = paste(str_to_title(freq_name(freq = freq)), " data starts from ", first(data_decompose$month) + 20, " and ends in ", last(data_decompose$month), ".", sep = "")) %>%
  fmt_percent(columns = 2:8, decimals = 2)
Table 3 - Trading Strategies: certainty equivalent gains
Monthly data starts from Feb 1986 and ends in Dec 2019.
Market BH BL BM SH SL SM
sop_simple 1.10% 2.62% −0.07% 1.80% −10.52% −6.58% 2.47%
DP −2.85% −3.28% −2.20% −4.60% 0.94% −3.48% −1.40%
PE 0.84% 1.19% −0.23% −1.47% −3.70% −2.71% 1.06%
EY 0.98% 1.33% −0.17% −1.11% −3.89% −2.24% 1.28%
DY −2.36% −2.80% −2.33% −4.46% −0.95% −8.02% −3.59%
Payout −4.13% −0.93% 0.09% −0.87% −3.36% −13.59% −0.11%

Table 4 - Sharpe ratio Gains

Trading Strategies: Sharpe ratio Gains

This table presents the Sharpe ratio of the out-of-sample performance of trading strategies, allocating funds between risk-free and risky assets for each portfolio. The annualised Sharpe ratio is generated by multipling the monthly Sharpe ratio by square root of the corresponding frequency (e.g. \(\sqrt{12}\) for monthly data).

dt <- table4.df %>%
  filter(rowname %in% c(ratio_names, "sop_simple")) %>%
  select(SRG_annualised, rowname, portname)

as.data.frame(matrix(dt$SRG_annualised, byrow = F, nrow = 6, ncol = 7)) %>%
  `colnames<-`(unique(dt$portname)) %>%
  mutate(Variable = unique(dt$rowname)) %>%
  # round(digits = 4) %>%
  as.tbl() %>%
  select(Variable, unique(dt$portname)) %>%
  gt(rowname_col = "Variable") %>%
  tab_header(title = "Table 4 - Trading Strategies: Sharpe ratio gains", 
             subtitle = paste(str_to_title(freq_name(freq = freq)), " data starts from ", first(data_decompose$month) + 20, " and ends in ", last(data_decompose$month), ".", sep = "")) %>%
  fmt_number(columns = 2:8, decimals = 4) 
Table 4 - Trading Strategies: Sharpe ratio gains
Monthly data starts from Feb 1986 and ends in Dec 2019.
Market BH BL BM SH SL SM
sop_simple 0.0524 0.1049 0.0052 0.1246 −0.1435 −0.0898 0.0974
DP −0.1667 −0.2297 −0.1590 −0.3009 0.0268 0.0638 −0.0689
PE 0.0674 0.0345 0.0662 −0.0811 −0.1610 −0.0556 0.0301
EY 0.0827 0.0398 0.0846 −0.0618 −0.1633 −0.0729 0.0399
DY −0.1441 −0.2041 −0.1686 −0.2949 0.0323 0.0717 −0.1194
Payout −0.1547 −0.0279 0.0191 −0.0283 −0.1447 −0.0164 −0.0044

Figure 6 - Sensitivity of Certainty Equivalent Gains relative to Risk-Aversion level

This figure presents the out-of-sample portfolio choice results at monthly frequency from bivariate predictive regressions and the SOP method with different levels of risk-aversion. To show that our previous results hold with respect to investors with different levels of risk aversion, we evaluate the changes in certainty equivalent gains with respect to the changes in the level of risk-aversion. The results of the trading strategy reported here are without trading restrictions (as in Table 5), allocating funds between the risk-free asset and the risky equity portfolio. The portfolio choice results are evaluated in the certainty equivalent return with relative risk-aversion coefficient \(\gamma\), with ${\(0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5\)}$. Risky equity portfolios include the market portfolio and six size and book-to-market equity sorted portfolios, BH, BM, BL, SH, SM and SL. The annualised certainty equivalent gain is the monthly certainty equivalent gain multiplied by twelve. The sample period is from February 1966 to December 2019 and the out-of-sample period starts in March 1986.

## [1] "Market"
## ##------ Wed May  4 11:57:30 2022 ------##
## [1] "BH"
## ##------ Wed May  4 11:57:30 2022 ------##
## [1] "BL"
## ##------ Wed May  4 11:57:30 2022 ------##
## [1] "BM"
## ##------ Wed May  4 11:57:31 2022 ------##
## [1] "SH"
## ##------ Wed May  4 11:57:31 2022 ------##
## [1] "SL"
## ##------ Wed May  4 11:57:31 2022 ------##
## [1] "SM"
## ##------ Wed May  4 11:57:31 2022 ------##
## Warning: Removed 4 rows containing missing values (geom_point).
## Warning: Removed 4 row(s) containing missing values (geom_path).

Table 5 - MSPE-adjusted Statistic

MSPE-adjusted Statistic

This table presents the MSEP-adjusted Statistics, evaluating the statistical significance of the out-of-sample R-squared statistics of each model in the corresponding portfolio.

See Rapach et al., (2010) and Clark and West (2007) for the detailed procedure.

table5.df <- data.frame()
for (port in names(TABLE5)) {
  pt <- TABLE5[[port]]
  pt$rowname <- rownames(pt)
  pt$portname <- port
  colnames(pt)[4] <- "star"
  table5.df <- rbind.data.frame(table5.df, pt)
}

table5.output <- gt(table5.df, rowname_col = "rowname", groupname_col = "portname") %>%
  fmt_percent(columns = vars(OOS_r.squared, mspe_pvalue), decimals = 2) %>%
  fmt_number(columns = vars(mspe_t), decimals = 4) %>%
  tab_header(title = "Table 5 - MSPE-adjusted Statistic",
             subtitle = paste(str_to_title(freq_name(freq = freq)), " data starts from ", first(data_decompose$month), " and ends in ", last(data_decompose$month), ".", sep = ""))

table5.output
Table 5 - MSPE-adjusted Statistic
Monthly data starts from Feb 1966 and ends in Dec 2019.
OOS_r.squared mspe_t mspe_pvalue star
Market
DP −1.04% 0.7486 22.73%
PE −0.23% 0.6344 26.31%
EY −0.17% 0.7180 23.66%
DY −0.86% 0.9945 16.03%
Payout −0.79% −1.4743 92.94%
SOP 0.47% 1.2007 11.53%
BH
DP −0.18% 1.6643 4.84% **
PE −0.22% −0.2182 58.63%
EY −0.20% −0.1411 55.61%
DY 0.05% 1.7892 3.72% **
Payout −1.12% −1.2121 88.69%
SOP 1.01% 1.6205 5.30% *
BL
DP −0.25% 0.6856 24.67%
PE 0.23% 1.1391 12.77%
EY 0.28% 1.1942 11.66%
DY −0.22% 0.8000 21.21%
Payout −0.10% 0.1001 46.02%
SOP 0.72% 1.5364 6.26% *
BM
DP −1.95% −0.6403 73.88%
PE −0.74% 0.7901 21.50%
EY −0.62% 0.8491 19.82%
DY −1.83% −0.5930 72.32%
Payout −0.36% 0.5802 28.11%
SOP 0.49% 1.3830 8.37% *
SH
DP −1.98% 0.2370 40.64%
PE −1.01% 0.9109 18.14%
EY −1.00% 1.0173 15.48%
DY −2.41% 0.7773 21.87%
Payout −0.67% 0.8633 19.42%
SOP −3.35% −0.0691 52.75%
SL
DP −1.53% 0.5760 28.25%
PE −1.88% −0.3806 64.81%
EY −1.58% −0.6145 73.04%
DY −1.94% 0.8480 19.85%
Payout −4.38% 0.0557 47.78%
SOP −0.41% 0.4251 33.55%
SM
DP −1.28% 0.5925 27.69%
PE −0.80% −0.9858 83.76%
EY −0.92% −0.7485 77.27%
DY −1.87% 0.8977 18.49%
Payout −0.55% −1.6260 94.76%
SOP −0.25% 0.6655 25.30%